package engine.game.gfx;

import java.io.Serializable;

public abstract class Sprite implements Renderable, Serializable {
	
	protected int[][] pixels;
	protected int width;
	protected int height;
	
	protected void init(int[][] pixels, int width, int height) {
		
		this.pixels = new int[width][height];
		for (int i = 0; i < width; i++) {
			for (int j = 0; j < height; j++) {
				this.pixels[i][j] = pixels[i][j];
			}
		}

		this.width = width;
		this.height = height;
	}
	
	public int[][] pixels() {
		return pixels;
	}
	
	public int width() {
		return width;
	}
	
	public int height() {
		return height;
	}
	
	public abstract Sprite flip(boolean flipX, boolean flipY);
}
